export const model = {
    id: undefined,
    jobName: undefined,
    invokeTarget: undefined,
    cronExpression: undefined,
    misfirePolicy: undefined,
    concurrent: undefined,
    useStatus: 0
}
export const rules = {
    jobName: [
        { required: true, message: '请输入任务名称', trigger: 'blur' },
    ],
    invokeTarget: [
        { required: true, message: '请输入调用目标字符串', trigger: 'blur' },
    ],
    cronExpression: [
        { required: true, message: '请输入cron执行表达式', trigger: 'blur' },
    ],
    misfirePolicy: [
        { required: true, message: '请选择计划执行错误策略', trigger: 'blur' },
    ],
    concurrent: [
        { required: true, message: '请选择是否并发执行', trigger: 'blur' },
    ],
    useStatus: [
        { required: true, message: '请输入状态', trigger: 'blur' },
    ],
}
export const columns = [
    {
        title: '序号',
        dataIndex: 'id',
        width: 70,
        align: 'center',
        customRender: (text, record, index) => {
            return index + 1;
        },
    },
    {
        title: '任务名称',
        dataIndex: 'jobName',
        key: 'jobName',
        width: 120,
        align: 'center',
        ellipsis: true,
    },
    {
        title: '目标字符串',
        dataIndex: 'invokeTarget',
        key: 'invokeTarget',
        width: 120,
        align: 'center',
        ellipsis: true,
    },
    {
        title: '表达式',
        dataIndex: 'cronExpression',
        key: 'cronExpression',
        width: 120,
        align: 'center',
        ellipsis: true,
    },
    {
        title: '错误策略',
        dataIndex: 'misfirePolicy;',
        key: 'misfirePolicy;',
        width: 100,
        align: 'center',
        scopedSlots: { customRender: 'misfirePolicy' },
    },
    {
        title: '并发执行',
        dataIndex: 'concurrent',
        key: 'concurrent',
        width: 100,
        align: 'center',
        scopedSlots: { customRender: 'concurrent' },
    },
    {
        title: '使用状态',
        dataIndex: 'useStatus',
        key: 'useStatus',
        width: 100,
        align: 'center',
        scopedSlots: { customRender: 'useStatus' },
    },
    {
        title: '更新人',
        dataIndex: 'updateBy',
        key: 'updateBy',
        width: 80,
        ellipsis: true,
        align: 'center',
    },
    {
        title: '更新时间',
        dataIndex: 'updateTime',
        key: 'updateTime',
        width: 120,
        align: 'center',
    },
    {
        title: '创建人',
        dataIndex: 'createBy',
        key: 'createBy',
        width: 80,
        align: 'center',
        ellipsis: true,
    },
    {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
        width: 120,
        align: 'center',
    },
    {
        title: '操作',
        key: 'action',
        width: 200,
        fixed: 'right',
        scopedSlots: { customRender: 'action' },
    },
];